#ifndef IMAIN_H
#define IMAIN_H

#include <QMainWindow>

#include "ThreadLinks.h"
#include "Chat.h"
#include "Gamer.h"
#include "Administrator.h"
#include "Database.h"

namespace Ui {
class IMain;
class Character;
class Monster;
class MonsterGroup;
class CreateCharacter;
class CreateMonster;
class Summary;
class Connexion;

}

class IMain : public QMainWindow
{
    Q_OBJECT

public:
    explicit IMain(QWidget *parent = 0);
    ~IMain();

private:


    void mainConnexion();
    void startChat();
    void startCharacter();

    bool isAdmin;

    Ui::IMain           *mainFrame;
    Ui::Character       *characFrame;
    Ui::Connexion       *connexionFrame;
    Ui::CreateCharacter *createCharacFrame;
    Ui::CreateMonster   *createMonsterFrame;
    Ui::Monster         *monsterFrame;
    Ui::MonsterGroup    *monsterGroupFrame;

    ThreadLinks         *th_links;
    Chat                *chat;

    Gamer               *gamer;
    Administrator       *admin;

    DataBase            *DB;

    QWidget             *connexion;

public slots:
    void mainClient();
    void mainServer();
    void adminSpells();
    void adminMonsters();
    void adminMembers();
    void clientChangeCharac();
    void clientCharacSheet();
    void clientCharacStory();

};

#endif // IMAIN_H
